package com.example.demo.mapper;

import com.example.demo.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface EmployeeMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(Employee record);


    int updateByPrimaryKey(Employee record);

    @Select("select * from employee where id=#{tid}")
    Employee getEmployee(@Param("tid") int id);

    List<Employee> selectAll();

    //    根据用户名查询用户
    Employee getEmployeeBylastName(String name);
}